<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>计票程序</title>
    <link rel="stylesheet" href="styles.css">
    <script src="chart.js"></script>
    <script src="html2canvas.min.js"></script>
</head>
<body>
    <h1>计票程序</h1>
    <div class="control-buttons">
        <button onclick="generateButtons()">设定</button>
        <button onclick="confirmReset()">清零</button>
        <button onclick="sortVotes()">排序</button>
    </div>
    <div id="buttonContainer" class="button-container"></div>
    <div class="visualization">
        <canvas id="barChart"></canvas>
        <canvas id="pieChart"></canvas>
    </div>
    <table id="resultTable">
        <thead>
            <tr>
                <th>事件</th>
                <th>票数</th>
            </tr>
        </thead>
        <tbody></tbody>
    </table>
    <button onclick="exportToJPG()">导出数据为 JPG</button>
    <div class="slider-container">
        <label for="fontSizeSlider">字体大小:</label>
        <input type="range" id="fontSizeSlider" min="16" max="48" value="16" oninput="adjustFontSize(this.value)">
    </div>
    <div class="instructions">
        <button onclick="showInstructions()">使用说明</button>
        <button onclick="toggleDarkMode()">切换模式</button>
        <button onclick="showVersionInfo()">版本说明</button>
    </div>
    <script src="script.js"></script>
</body>
</html>